package graph.scenes;

import static ogl.vecmathimp.FactoryDefault.vecmath;
import graph.entities.Scale;
import graph.entities.Walk;
import graph.parts.Group;
import graph.parts.Light;
import graph.shapes.Mesh;
import ogl.vecmathimp.MatrixImp;

public class iPadScene extends DefaultScene {

	public iPadScene() {
		super();
	}
	
	@Override
	public void buildSceneGraph() {
		Group g = new Group();
		g.setMatrix((MatrixImp) g.getMatrix().mult(
				vecmath.translationMatrix(-5, 0.25f, 0)));

		/* Licht */
		Light l = new Light(vecmath.vector(-0.5f, 4, 0));
		Walk wLight = new Walk(l);
		entities.addEntity(wLight);
		root.addPart(l);
		
		/* iPad */
		String dir = System.getProperty("user.dir");
		Mesh m = new Mesh(dir + "\\resources\\obj\\iPad.obj");
		g.addPart(m);
		Scale s = new Scale(m);
		entities.addEntity(s);
		
		/* Camera */
		addCamera(vecmath.vector(0, 0, 100));
		
		/* Zusammenbauen */
		root.addPart(g);
	}

}
